from langchain_community.document_loaders import CSVLoader


# 加载csv文件
def load_csv_data(file_path):
    loader = CSVLoader(file_path=file_path)
    data = loader.load()
    return data


def load_csv_file():
    file_path = '../../load_file/mlb_teams_2012.csv'
    data = load_csv_data(file_path)
    print(data)
